package com.dragon.modules.yuegou.query.merchant;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.merchant.UserJpushEntity;
import com.dragon.modules.yuegou.enums.merchant.UserJpushType;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 商户用户极光对应关系表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-12-26 17:08:02
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class UserJpushQuery extends UserJpushEntity implements Query<UserJpushEntity>{

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "merchantId")
	private Condition<String> merchantIdCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "merchantUserId")
	private Condition<String> merchantUserIdCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 状态，是否有效查询条件 */
	@JsonUnwrapped(prefix = "status")
	private Condition<Boolean> statusCondition;

    /** 极光id查询条件 */
	@JsonUnwrapped(prefix = "jpushId")
	private Condition<String> jpushIdCondition;

    /** [枚举]极光类型：0-安卓-ANDROIN、1-苹果-IOS查询条件 */
	@JsonUnwrapped(prefix = "type")
	private Condition<UserJpushType> typeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public UserJpushQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public UserJpushQuery(UserJpushEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public UserJpushQuery(UserJpushQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.merchantIdCondition != null) {
			this.merchantIdCondition = other.merchantIdCondition.copy();
		}
		if(other.merchantUserIdCondition != null) {
			this.merchantUserIdCondition = other.merchantUserIdCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.statusCondition != null) {
			this.statusCondition = other.statusCondition.copy();
		}
		if(other.jpushIdCondition != null) {
			this.jpushIdCondition = other.jpushIdCondition.copy();
		}
		if(other.typeCondition != null) {
			this.typeCondition = other.typeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<UserJpushEntity> toQueryWrapper() {
		QueryWrapper<UserJpushEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (merchantIdCondition != null) {
			merchantIdCondition.toWrapper(wrapper, COL_MERCHANT_ID);
		}
		if (merchantUserIdCondition != null) {
			merchantUserIdCondition.toWrapper(wrapper, COL_MERCHANT_USER_ID);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (statusCondition != null) {
			statusCondition.toWrapper(wrapper, COL_STATUS);
		}
		if (jpushIdCondition != null) {
			jpushIdCondition.toWrapper(wrapper, COL_JPUSH_ID);
		}
		if (typeCondition != null) {
			typeCondition.toWrapper(wrapper, COL_TYPE);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return merchantIdCondition 查询条件
	 */
	public Condition<String> merchantId() {
		this.merchantIdCondition = new Condition<>();
		return this.merchantIdCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return merchantIdCondition 查询条件
	 */
	public Condition<String> getMerchantIdCondition() {
		return merchantIdCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param merchantIdCondition 查询条件
	 */
	public void setMerchantIdCondition(Condition<String> merchantIdCondition) {
		this.merchantIdCondition = merchantIdCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return merchantUserIdCondition 查询条件
	 */
	public Condition<String> merchantUserId() {
		this.merchantUserIdCondition = new Condition<>();
		return this.merchantUserIdCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return merchantUserIdCondition 查询条件
	 */
	public Condition<String> getMerchantUserIdCondition() {
		return merchantUserIdCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param merchantUserIdCondition 查询条件
	 */
	public void setMerchantUserIdCondition(Condition<String> merchantUserIdCondition) {
		this.merchantUserIdCondition = merchantUserIdCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param createdTimeCondition 查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回状态，是否有效查询条件
	 * 
	 * @return statusCondition 状态，是否有效查询条件
	 */
	public Condition<Boolean> status() {
		this.statusCondition = new Condition<>();
		return this.statusCondition;
	}
	
	/**
	 * 获取状态，是否有效查询条件
	 * 
	 * @return statusCondition 状态，是否有效查询条件
	 */
	public Condition<Boolean> getStatusCondition() {
		return statusCondition;
	}

	/**
	 * 设置状态，是否有效查询条件
	 * 
	 * @param statusCondition 状态，是否有效查询条件
	 */
	public void setStatusCondition(Condition<Boolean> statusCondition) {
		this.statusCondition = statusCondition;
	}

	/**
	 * 构造并返回极光id查询条件
	 * 
	 * @return jpushIdCondition 极光id查询条件
	 */
	public Condition<String> jpushId() {
		this.jpushIdCondition = new Condition<>();
		return this.jpushIdCondition;
	}
	
	/**
	 * 获取极光id查询条件
	 * 
	 * @return jpushIdCondition 极光id查询条件
	 */
	public Condition<String> getJpushIdCondition() {
		return jpushIdCondition;
	}

	/**
	 * 设置极光id查询条件
	 * 
	 * @param jpushIdCondition 极光id查询条件
	 */
	public void setJpushIdCondition(Condition<String> jpushIdCondition) {
		this.jpushIdCondition = jpushIdCondition;
	}

	/**
	 * 构造并返回[枚举]极光类型：0-安卓-ANDROIN、1-苹果-IOS查询条件
	 * 
	 * @return typeCondition [枚举]极光类型：0-安卓-ANDROIN、1-苹果-IOS查询条件
	 */
	public Condition<UserJpushType> type() {
		this.typeCondition = new Condition<>();
		return this.typeCondition;
	}
	
	/**
	 * 获取[枚举]极光类型：0-安卓-ANDROIN、1-苹果-IOS查询条件
	 * 
	 * @return typeCondition [枚举]极光类型：0-安卓-ANDROIN、1-苹果-IOS查询条件
	 */
	public Condition<UserJpushType> getTypeCondition() {
		return typeCondition;
	}

	/**
	 * 设置[枚举]极光类型：0-安卓-ANDROIN、1-苹果-IOS查询条件
	 * 
	 * @param typeCondition [枚举]极光类型：0-安卓-ANDROIN、1-苹果-IOS查询条件
	 */
	public void setTypeCondition(Condition<UserJpushType> typeCondition) {
		this.typeCondition = typeCondition;
	}

}
